﻿<%@ WebHandler Language="VB" Class="GetThumbnail" %>

Imports System
Imports System.Web
Imports System.IO

Public Class GetThumbnail : Implements IHttpHandler
    
    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest

        Dim _thumbFileName As String = System.Web.HttpUtility.UrlDecode(context.Request.QueryString(0))
        
        context.Response.ContentType = "image/jpeg"
        context.Response.WriteFile(_thumbFileName)

    End Sub
 
    Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            Return False
        End Get
    End Property

End Class